# -*-coding:utf-8 -*-
# from db.basic_db import Base
# from db.tables import *

class LoginInfo():
    # __table__ = login_info
    def __init__(self):
        self.id = ''
        self.name = ''
        self.password = ''
        self.enable = ''

class KeyWords():
    #__table__ = keywords
    def __init__(self):
        self.id = ''
        self.keyword = ''
        self.enable = ''

# 微博数据模型----MySQL
# class WeiboData(Base):
#     __table__ = weibo_data
#     def __repr__(self):
#         return "'weibo_id':'{}','weibo_cont':'{}'" \
#                 .format(self.weibo_id, self.weibo_cont,)


# 微博数据模型-----mongodb
class WeiboData():
    # __table__ = weibo_data
    def __init__(self):
        self.weibo_id=''
        self.weibo_cont=''
        self.repost_num=''
        self.comment_num=''
        self.praise_num=''
        self.uid=''
        self.is_origin=''
        self.device=''
        self.weibo_url=''
        self.create_time=''
        self.comment_crawled=''
        self.repost_crawled=''
        self.weibo_keyword = ''
        self.weibo_adminid=''
        self.searchtime = ''

    def __str__(self):
        return "'weibo_id':'{}','weibo_cont':'{}','repost_num':'{}'," \
               "'comment_num':'{}','praise_num':'{}','uid':'{}'," \
               "'weibo_url':'{}','create_time':'{}'," \
               "'weibo_keyword':'{}','weibo_adminid':'{}'," \
               "'searchtime':'{}'".format(self.weibo_id, self.weibo_cont, self.repost_num,
                                                           self.comment_num, self.praise_num, self.uid,
                                                           self.weibo_url, self.create_time,
                                                           self.weibo_keyword,self.weibo_adminid,
                                                           self.searchtime
                                                           )
    def __repr__(self):
        return "'weibo_id':'{}','weibo_cont':'{}','repost_num':'{}'," \
               "'comment_num':'{}','praise_num':'{}','uid':'{}'," \
               "'weibo_url':'{}','create_time':'{}'," \
               "'weibo_keyword':'{}','weibo_adminid':'{}'".format(self.weibo_id, self.weibo_cont, self.repost_num,
                                                                  self.comment_num, self.praise_num, self.uid,
                                                                  self.weibo_url, self.create_time,
                                                                  self.weibo_keyword, self.weibo_adminid
                                                                  )

# 微信数据模型----------MySQL
# class WeiXinData(Base):
#     __table__ = weixin_data
#     def __repr__(self):
#         return "'weixin_id':'{}','weixin_cont':'{}','weixin_title':'{}'," \
#                "'weixin_created':'{}','weixin_created_name':{}" \
#             .format(self.weixin_id,self.weixin_cont, self.weixin_title,
#                     self.weixin_created, self.weixin_created_name)

# 微信数据模型----------mongodb
class WeiXinData():
    def __init__(self):
        self.weixin_id = ''
        self.weixin_cont = ''
        self.weixin_title = ''
        self.weixin_created = ''
        self.weixin_created_name = ''
        self.weixin_keyword = ''
        self.admin_id = ''
        self.searchtime = ''

    def __str__(self):
        return "'weixin_id':'{}','weixin_cont':'{}','weixin_title':'{}'," \
               "'weixin_created':'{}','weixin_created_name':'{}','weixin_keyword':'{}'," \
               "'admin_id':'{}','searchtime':'{}'" \
            .format(self.weixin_id,self.weixin_cont, self.weixin_title,
                    self.weixin_created, self.weixin_created_name,self.weixin_keyword,
                    self.admin_id,self.searchtime)

    def __repr__(self):
        return "'weixin_id':'{}','weixin_cont':'{}','weixin_title':'{}'," \
               "'weixin_created':'{}','weixin_created_name':'{}','weixin_keyword':'{}'," \
               "'admin_id':'{}'" \
            .format(self.weixin_id, self.weixin_cont, self.weixin_title,
                    self.weixin_created, self.weixin_created_name, self.weixin_keyword,
                    self.admin_id)




class WxLoginQcode():
    def __init__(self):
        self.adminid = ''
        self.requstuuid = ''
        self.codeurl = ''
        self.cookies = ''
    def __str__(self):
        return "'adminid':'{}','requstuuid':'{}','codeurl':'{}','cookies':{}"\
            .format(self.adminid, self.requstuuid, self.codeurl,self.cookies)
    def __repr__(self):
        return "'adminid':'{}','requstuuid':'{}','codeurl':'{}','cookies':{}" \
            .format(self.adminid, self.requstuuid, self.codeurl, self.cookies)




